home *** CD-ROM | disk | FTP | other *** search
/ NetNews Offline 2 / NetNews Offline Volume 2.iso / news / comp / lang / c++-part2 / 12541 < prev    next >
Encoding:
Internet Message Format  |  1996-08-05  |  1.7 KB

  1. Path: tank.news.pipex.net!pipex!warwick!leicester!usenet
  2. From: "J. Springthorpe" <juy@le.ac.uk>
  3. Newsgroups: comp.lang.c++
  4. Subject: BIG TIME HELP needed (watcom c++ or sgi CC).
  5. Date: 18 Mar 1996 09:23:18 GMT
  6. Organization: University of Leicester, UK
  7. Message-ID: <4ija26$670@ipgate.le.ac.uk>
  8. NNTP-Posting-Host: irix.le.ac.uk
  9. Mime-Version: 1.0
  10. Content-Type: text/plain; charset=us-ascii
  11. Content-Transfer-Encoding: 7bit
  12. X-Mailer: Mozilla 1.1S (X11; I; IRIX 5.3 IP19)
  13. X-URL: news:comp.lang.c++
  14.  
  15. help would be very much appreciated. My c++ source code works fine using
  16. borland c++ turbo.
  17.  
  18. the source code compiles fine using watcom c++, however, my program crashes out
  19. when it comes across this line (while running);
  20.  
  21. (parts of code)
  22. Member m;  // class Mamber
  23. membersFile.open("members.dat", ios::in | ios::binary);
  24. membersFile.read((char *) &m, sizeof(m));    // DOES NOT LIKE THIS LINE
  25.  
  26.  
  27. when trying to compile source code on an sgi machine using CC, I get these
  28. complile errors;
  29.  
  30. members.cpp:
  31. "member.h", line 8: error(3337): invalid redeclaration of type name "Member"
  32.   class Member
  33.         ^
  34.  
  35. "members.cpp", line 30: error(3225): class "ios" has no member "binary"
  36.     membersFile.open("members.dat", ios::app | ios::binary); // ios::app -
  37. append mode
  38.  
  39. If any one is a die hard c++ whiz, I'd be happy to send you my source code
  40. (only a small program) for more details. Thanks v. much for any help.
  41.  
  42.  
  43. *******************************************************************************
  44. *               Stunt Bat Juy - Most Dramatic Grade V Probe Run               *
  45. *                http://www.le.ac.uk/CWIS/SU/SO/CASOC/juy.html                *
  46. *******************************************************************************
  47.  
  48.